package com.huage.courseplatform.application.model.param;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.ibatis.annotations.Update;

import javax.validation.constraints.Future;
import javax.validation.constraints.NotEmpty;
import java.io.Serializable;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="课时生成参数",description="课时生成参数")
public class PeriodGeneratePARAM implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "模板id(id为空时，使用默认模板)",required = true)
    private String templateId;

    @NotEmpty(message = "商户id不能为空")
    @ApiModelProperty(value = "商户id",required = true)
    private String businessId;

    @NotEmpty(message = "开始日期为空")
    @Future(message = "开始时间,不能在当前时间之前")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone="Asia/Shanghai")
    @ApiModelProperty(value = "开始日期",required = true)
    private String startDay;

    @NotEmpty(message = "结束日期为空")
    @Future(message = "结束时间,不能在当前时间之前")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone="Asia/Shanghai")
    @ApiModelProperty(value = "结束日期id",required = true)
    private String endDay;
}
